package cn.hss.object.stat;

import java.time.LocalDate;

/**
 * @author 作者：HeShaoShuai
 * @Email 邮箱：2569819541@qq.com
 * @Date 日期：2023/4/25 20:05
 * @Package 包名：cn.hss.object.stat
 * @Project 项目名：JavaSE
 * @Version 1.0
 */
public class Account {
private Integer id;
private String pwd;
private double balance;//余额
private static double rate;//利率
private static double minBalance=1.0;//最小余额
		{
		System.out.println("我是我。。。。");
		}
static {
		minBalance=2.0;
		}
//自动生成账号id
private static Integer init=Integer
		.valueOf((LocalDate.now()+"")
		.replace("-", ""));
public Account(){
		this.id= init;
		init++;
		pwd="80231314";
		balance=Math.random()*100000+1;
		}
static {
		rate=2.0;
		}
public Account(Integer id,String pwd,double balance) {
		this.id = id;
		this.pwd = pwd;
		this.balance = balance;
		}

@Override
public String toString() {
		return "Account{" +
		"id=" + id +
		", pwd='" + pwd + '\'' +
		", balance=" + balance +
		'}';
		}
public Integer getId() {
		return id;
		}

public void setId(final Integer id) {
		this.id = id;
		}

public String getPwd() {
		return pwd;
		}

public void setPwd(final String pwd) {
		this.pwd = pwd;
		}

public double getBalance() {
		return balance;
		}

public void setBalance(final double balance) {
		this.balance = balance;
		}

public static double getRate() {
		return rate;
		}

public static void setRate(final double rate) {
		Account.rate = rate;
		}

public static double getMinBalance() {
		return minBalance;
		}

public static void setMinBalance(final double minBalance) {
		Account.minBalance = minBalance;
		}

		}